package com.easy.easylibdemo.ui.mulitlist.delegate;

import com.easy.easylibdemo.R;
import com.easy.easylibdemo.ui.mulitlist.model.TitleBean;
import com.guyj.base.ItemViewDelegate;
import com.guyj.base.ViewHolder;

/**
 * 作　　者: guyj
 * 修改日期: 2016/12/22
 * 描　　述:
 * 备　　注:
 */
public class DelegateTitle implements ItemViewDelegate<Object>{
    @Override
    public int getItemViewLayoutId() {
        return R.layout.item_title;
    }

    @Override
    public boolean isForViewType(Object o, int i) {
        return o instanceof TitleBean;
    }

    @Override
    public void convert(ViewHolder viewHolder, Object o, int i) {
        viewHolder.setText(R.id.tv_title,((TitleBean)o).getName());
        viewHolder.setOnItemChildClickListener(R.id.tv_more);
    }
}
